package admin

import (
	"context"
	"server/internal/model"
	"server/internal/service"

	"server/api/admin/system"
)

func (c *ControllerSystem) CrontabCategoryList(ctx context.Context, req *system.CrontabCategoryListReq) (res *system.CrontabCategoryListRes, err error) {
	res = new(system.CrontabCategoryListRes)
	res.List, res.Total, err = service.SystemCrontabCategory().List(ctx, model.SystemCrontabCategoryListInput{
		Page:     req.Page,
		PageSize: req.PageSize,
		Name:     req.Name,
	})
	return
}
